4D Chart v13CT AREA TO FIELD |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Chart v13
CT AREA TO FIELD
|
CT AREA TO FIELD ( area ; scope ; numTable ; numField ; saveOption ) | ||||||||
Parameter | Type | Description | ||||||
area | Longint |
![]() |
4D Chart area | |||||
scope | Longint |
![]() |
Scope of the command -2 = Document -1 = All 0 = Selected objects >0 = Object ID | |||||
numTable | Integer |
![]() |
Table number | |||||
numField | Integer |
![]() |
Field number | |||||
saveOption | Integer |
![]() |
Method of saving the contents of area 1 = Picture only 2 = Data only 3 = Picture and data -1 = No change | |||||
The CT AREA TO FIELD command copies the contents of area into the BLOB or Picture field specified by table and field.
CT AREA TO FIELD is useful when you want to store objects in a field of a related table or store only specific objects. CT AREA TO FIELD simply assigns the objects to field. The record in table must still be saved.
scope controls what is copied.
The optional saveOption parameter determines how the document in the 4D Chart area is saved.
This example creates a related record for an object in area.
`Create a record to store the object
CREATE RECORD([Objects])
`Assign the relating value
[Objects]Key:=[Charts]Name
`Get the object’s ID
$Temp:=CT Get ID(Area;-1;3)
`Copy the object into the record
CT AREA TO FIELD(Area;$Temp;3;2;1)
`Save the record
SAVE RECORD([Objects])
Product: 4D Chart
Theme: CT Area
Number:
14507
Created: 4D Chart 1